package com.wms.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyMvcConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("login");
        registry.addViewController("/index").setViewName("login");
        registry.addViewController("/index.html").setViewName("login");
        registry.addViewController("/wine-list").setViewName("wine/wine-list");
        registry.addViewController("/admin-list").setViewName("admin/admin-list");
        registry.addViewController("/admin-add").setViewName("admin/admin-add");
        registry.addViewController("/admin-edit").setViewName("admin/admin-edit");
        registry.addViewController("/member-list").setViewName("member-list");
        registry.addViewController("/member-edit").setViewName("member-edit");
        registry.addViewController("/member-add").setViewName("member-add");
        registry.addViewController("/toIndex").setViewName("index");
        registry.addViewController("/wine-edit").setViewName("wine/wine-edit");
        registry.addViewController("/category-edit-block").setViewName("wine/category-edit-block");


    }
}
